import os
import sys

while(True):
    os.system("hg recover")
    path = os.path.abspath(os.curdir)
    #index = sys.argv[0].rfind("\\")

    #print sys.argv[0]
    #path = sys.argv[0][0:index]    
    #print path
    #break

    cmd = "hg --repository " + path + " push -f https://hg.codeplex.com/csdevnet"
    os.system(cmd)


